<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Algorithms">
<meta name="DC.subject" content="Algorithms">
<meta name="keywords" content="Algorithms">
<meta name="DC.Relation" scheme="URI" content="../reference/reference.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/splittable_concept.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/range_concept.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/partitioners.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_for_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_reduce_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_deterministic_reduce_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_scan_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_do_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_for_each_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/pipeline_cls.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_pipeline_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_sort_func.htm">
<meta name="DC.Relation" scheme="URI" content="../reference/algorithms/parallel_invoke_func.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="algorithms">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../intel_css_styles.css">
<title>Algorithms</title>
<xml>
<MSHelp:Attr Name="DocSet" Value="Intel"></MSHelp:Attr>
<MSHelp:Attr Name="Locale" Value="kbEnglish"></MSHelp:Attr>
<MSHelp:Attr Name="TopicType" Value="kbReference"></MSHelp:Attr>
</xml>
</head>
<body id="algorithms">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(1);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="algorithms"><!-- --></a>


    <h1 class="topictitle1">Algorithms</h1>

     
    <div> 
        <p>Most parallel algorithms provided by Intel&reg;
            Threading Building Blocks (Intel&reg; TBB) are generic. They operate on all
            types that model the necessary concepts. Parallel algorithms may be nested. For
            example, the body of a <samp class="codeph">parallel_for</samp> can invoke another <samp class="codeph">parallel_for</samp>. 
        </p>
 
        <div class="Note"><h3 class="NoteTipHead">
					Caution</h3> 
            <p> When the body of an outer parallel algorithm invokes another parallel
                algorithm, it may cause the outer body to be re-entered for a different
                iteration of the outer algorithm. 
            </p>
 
            <p>For example, if the outer body holds a global lock while calling an
                inner parallel algorithm, the body will deadlock if the re-entrant invocation
                attempts to acquire the same global lock. This ill-formed example is a special
                case of a general rule that code should not hold a lock while calling code
                written by another author. 
            </p>
 
        </div> 
    </div>
 

<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../reference/reference.htm">Intel&reg; Threading Building Blocks Reference Manual</a></div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><a href="../reference/algorithms/splittable_concept.htm">Splittable Concept</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/range_concept.htm">Range Concept</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/partitioners.htm">Partitioners</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_for_func.htm">parallel_for Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_reduce_func.htm">parallel_reduce Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_deterministic_reduce_func.htm">parallel_deterministic_reduce Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_scan_func.htm">parallel_scan Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_do_func.htm">parallel_do Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_for_each_func.htm">parallel_for_each Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/pipeline_cls.htm">pipeline Class</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_pipeline_func.htm">parallel_pipeline Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_sort_func.htm">parallel_sort Template Function</a><br>
</li>
<li class="ulchildlink"><a href="../reference/algorithms/parallel_invoke_func.htm">parallel_invoke Template Function</a><br>
</li>
</ul>
</div>

</body>
</html>
